package day11;

public class CarTest {
    public static void main(String[] args) {
        
        Car car = new Car();
        car.setColor("白色");
        car.setBrand("宝马");
        car.setPrice(350000.0);
        
        // 调用方法，输出对象属性信息
        car.output();

        // 调用前进、后退、转弯等方法
        car.forward();
        car.backward();
        car.turn();
        
        System.out.println();
        
        // 用带参数的构造方法创建对象
        Car car2 = new Car("黑色", "特斯拉", 450000.0);
        System.out.println("第二辆汽车的信息：");
        car2.output();
        car2.forward();
        car2.backward();
        car2.turn();
    }
}